#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

#include <unistd.h>
#include <sys/wait.h>

int main(int argc, char const *argv[])
{
	char line[4096];
	FILE *fpin, *fpout;

	fpin = fopen(argv[1], "r");
	fpout = popen("/bin/more", "w");

	while (fgets(line, 4096, fpin) != NULL) 
		fputs(line, fpout);

	pclose(fpout);
	fclose(fpin);

	return 0;
}